
            $(function(){
                print();
            });
            function print(){
                html2canvas( $("#canv") ,{
                    onrendered: function(canvas){
                        $('#down_button').attr( 'href', canvas.toDataURL() ) ;
                        $('#down_button').attr( 'download' , 'myjobdeer.png' ) ;
                        var html_canvas = canvas.toDataURL();
                        $.post('', {order_id:1,type_id:2,html_canvas:html_canvas}, function(json){
                        }, 'json');
                    }
                });
            }
        </script>
        

	$(document).ready(function() {
		console.log($("#reservation").val("2017-6-17 - 2017-7-17"))
		//value=
		$('#reservation').daterangepicker(null, function(start, end, label) {
			console.log(start.toISOString(), end.toISOString(), label);
		});
	});
	

	var myDate = new Date(); //获取今天日期
	myDate.setDate(myDate.getDate() - 7);
	var dateArray = [];
	var dateTemp;
	var flag = 1;
	for(var i = 0; i < 7; i++) {
		dateTemp = (myDate.getMonth() + 1) + "-" + myDate.getDate();
		dateArray.push(dateTemp);
		myDate.setDate(myDate.getDate() + flag);
	}
	//console.log( dateArray )

	// 图表
	var myChart = echarts.init(document.getElementById('main'));
	option = {
		title: {
			text: '趋势图',
			left: "4%",
			top: "3%",
			Size: 7,
		},
		tooltip: {
			trigger: 'axis',
			axisPointer: {
				lineStyleColor: "#fff"
			}
		},
		legend: {
			data: ['展现量', '点击量'],
			top: "4%",
			right: "10%"
		},
		toolbox: {
			show: true,
			feature: {
				mark: {
					show: true
				},
				saveAsImage: {
					show: true
				}
			},
			right: "4%",
			top: "2%"
		},
		calculable: true,
		xAxis: [{
			type: 'category',
			boundaryGap: false,
			data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
		}],
		yAxis: [{
			type: 'value',
			axisLabel: {
				formatter: '{value} W'
			}
		}],
		series: [{
				name: '展现量',
				type: 'line',
				stack: '总量',
				symbolSize: 5,
				smooth: true,
				label: {},
				areaStyle: {
					normal: {}
				},
				itemStyle: {
					normal: {
						color: '#bad8fa',
						lineStyle: {
							shadowColor: '#01aaff'
						}
					},
					emphasis: {
						color: '#bad8fa'
					}
				},
				data: [120, 132, 101, 134, 90, 230, 210]
			},
			{
				name: '点击量',
				type: 'line',
				stack: '总量',
				label: {},
				smooth: true,
				symbolSize: 5,
				areaStyle: {
					normal: {}
				},
				itemStyle: {
					normal: {
						color: '#e9d8f5',
						lineStyle: {
							shadowColor: '#c08de3'
						}
					},
					emphasis: {
						color: '#e9d8f5'
					}
				},
				data: [120, 132, 901, 134, 120, 130, 120]
			}
		]
	};

	// 使用刚指定的配置项和数据显示图表。
	myChart.setOption(option);


/*<!--分页	 -->*/
<script type="text/javascript">
	function callBackPagination() {

		var GZ = 80,
			TS = 7;

		var totalCount = Number($('#totalCount1').val()) || GZ,
			showCount = $('#showCount1').val(),

			limit = Number($('#limit').val()) || TS; //显示条数

		createTable(1, limit, totalCount);

		$('#callBackPager').extendPagination({

			totalCount: totalCount,

			showCount: showCount,

			limit: limit,

			callback: function(curr, limit, totalCount) {
				createTable(curr, limit, totalCount);
			}

		});
	}

	/* next    previous*/
	callBackPagination()
	function createTable(currPage, limit, total) {
		console.log(limit)
		console.log(total)
		console.log(currPage)
		var ZH = Math.ceil(Number(total / limit))
		if(currPage == ZH) {

		} else if(currPage == 1) {
		}
	}


 $(window).on("scroll",function(){
        var $this = $(this);
        var st = $this.scrollTop();
        if(st>161){
           $(".RightTime").addClass("Shadow")
        }  else {
           $(".RightTime").removeClass("Shadow");
        }
    });
